home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.46
/
stinglibpcq
/
english
/
string.lib.doc
< prev
next >
Wrap
Text File
|
1995-03-27
|
5KB
|
132 lines
String.Lib v1.0
an help using strings with PCQ
Copyright (C) 1995 by Michel Tournay
utilisation guide
WARNING
String.lib v1.0 have a copyright but :
- you could distribute it in your own collection if all files
are include
joinlib 108 joinlib.sh 30
makeo 151 makeo.sh 133
string.lib 1696
Source/Copy.p 259 Source/CPos.p 559
Source/Delete.p 330 Source/Free.p 330
Source/Insert.p 384 Source/Lower.p 222
Source/Upper.p 222 Object/Copy.o 188
Object/CPos.o 252 Object/Delete.o 288
Object/Free.o 168 Object/Insert.o 352
Object/Lower.o 224 Object/Upper.o 224
Francais/Essai_Str_C_Pos 5564 Francais/Essai_Str_C_Pos.p 352
Francais/string.i 1790 Francais/string.lib.doc 5975
English/Trial_Str_C_Pos 5556 English/Trial_Str_C_Pos.p 344
English/string.i 1630 English/string.lib.doc 5055
and if you don't ask more than 6 USD or equivalent in your
country.
- you could modify it and distribute this new version but with
a new version number and the history complete. If you want,
you have the right to send your new version to the old author!
I use String.Lib in many progs and the functions had been tested but
I could not certifiate that there's no bugs. In fact there is no, but...
So I could not be responsable of any damages on your files.
Pat Quaid said in the doc of the compiler that it does not manipulate
strings very well and don't have the good functions of Borland's Turbo
Pascal. So I have decided to wrote those functions.
They are under a runtime library form who had to be link to your prog
with BLink (LIB option). The descriptions of the functions are in the
string.i file wich best place is, for my mind, in the include:utils
directory.
The lybrary's functions are preceded of 'Str_' in order to avoid
name conflict with other functions. There is three functions comming from
Borland's language : Copy, Delete and Insert ; two usefull fonction I
decide to include because they are very practical (but not very hard to
do) : Lower and Upper ; and a very very usefull function but it seems to
be a little harder than the two lasts : Str_C_Pos.
All the functions allocate themself the memory for the returned string
so you don't have to think about it. But in fact there is a restriction :
you can not make something like :
s := Str_Copy(s,10,10);
because in memory you always have the primal string without any pointer
to access it! So make something like :
a := s;
s := Str_Copy(s,10,10);
freestring(a);
EXAMPLES
/------------------------------\
| Function | input | output |
|------------+--------+--------|
| Str_Lower | ABCDEF | abcdef |
|------------+--------+--------|
| Str_Upper | abcedf | ABCDEF |
|------------+--------+--------|
| Str_Copy | abcdef | cd |
| | 3 | |
| | 2 | |
|------------+--------+--------|
| Str_Delete | abcdef | abef |
| | 3 | |
| | 2 | |
|------------+--------+--------|
| Str_Insert | abef | abcdef |
| | cd | |
| | 3 | |
\------------------------------/
I hope that those little functions would help you manipulating strings.
Don't hesitate to contact me. And I'm sorry for my poor english...
------------------------------------------------------------------------------
String.Lib v1.0 1696 bytes
First distributed version. No known bugs.
author : Michel Tournay
27 ru felix pres
08600 Fromelennes
FRANCE
MichelT@email.teaser.com
------------------------------------------------------------------------------